<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style id="sty">
			*{padding: 0; margin: 0;}
			ul,li{
				 list-style: none;
			}

			#banner{
				width: 800px;
				height: 360px;
				margin: 100px auto;
				perspective: 800px;
				perspective-origin: right;
			}
			.list{
				width: 800px;
				height: 360px;
			}
			.list li{
				width: 10px;
				height: 360px;
				position: relative;
				float: left;				
				transform-style: preserve-3d ;
				transform: rotateX(0deg);
				transform-origin: center center -180px;
			}
			.list li a{
				width: 10px;
				height: 360px;
				position: absolute;
				left: 0;
				top: 0;
			}
			.list li a:nth-child(1){
				display: block;
				background: url(01.jpg) no-repeat;
			}
			.list li a:nth-child(2){
				display: block;
				background: url(02.jpg) no-repeat;
				top: -360px;
				transform: rotateX(90deg);
				transform-origin: bottom;
			}
			.list li a:nth-child(3){
				display: block;
				background: url(03.jpg) no-repeat;
				transform: translateZ(-360px) rotateX(180deg);
			}
			.list li a:nth-child(4){
				display: block;
				background: url(04.jpg) no-repeat;
				top: 360px;
				transform: rotateX(-90deg);
				transform-origin: top;
			}
			/*#btn{
				width: 50px;
				height: 50px;
				background: yellowgreen;
				
			}*/
			#btn li{
				float: left;
				width: 50px;
				height: 50px;
				background: yellowgreen;
				line-height: 50px;
				text-align: center;
				border-radius: 50%;
				margin-right: 10px;
			}
		</style>
	</head>
	<body>
		<div id="banner">
			<ul class="list" id="list">					
				<li>
					<a href=""></a>
					<a href=""></a>
					<a href=""></a>
					<a href=""></a>
					
				</li>
				
			</ul>
			<ul id="btn">
				<li>1</li>
				<li>2</li>
				<li>3</li>
				<li>4</li>
			</ul>
		</div>
		<script>
			var list = document.getElementById("list")
			var listli = list.getElementsByTagName("li")
			var brn = document.getElementById("btn")
			var btnli= btn.getElementsByTagName("li")
			var str = document.getElementById("sty")
			var num=80 ;var sli = "";var styles =  "";
			for(var i = 0 ; i < num ; i++){
				sli += '<li><a href=""></a><a href=""></a><a href=""></a><a href=""></a></li>'
				styles += '.list li:nth-child('+(i+1)+') a{background-position:-'+i*10+'px center}'
			}
			list.innerHTML=sli;
			str.innerHTML+=styles;
			
			for(var i = 0;i<btnli.length;i++){
				btnli[i].index=i	
				btnli[i].onclick=function(){
					for(var j = 0 ;j < listli.length;j++){
						listli[j].style.transition ="all "+(100+50*j)+"ms"
						listli[j].style.transform ="rotateX("+90*this.index+"deg)"
					}
				}
			}
		</script>
	</body>
</html>
